define(['app'],function(app){return {module: function($scope, $http, eventBusService, httpService, params) {
	$scope.form.type = "0";
	$scope.form.level = "0";
	$scope.form.status = "0";
	$scope.saveForm = function(){
		if($scope.formCheck()){
			httpService.post(app.urls.rule_insert,$scope.form,function(data){
				if("0000" === data.code){
					eventBusService.publish("content.page.reload.",data.data);
					eventBusService.publish("modal.page.close",{});
					$scope.form = {};
	    		}else{
	    			alert(data.msg);
	    		}
			});
		}
		
	}      
}}});